package product.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import product.model.ProductInfo;
import product.service.ProductService;


@RequestMapping("/product")
@RestController
public class ProductController {

    @Autowired
    private ProductService productService;


    @RequestMapping("/{productId}")
    public ProductInfo getProductInfo(@PathVariable("productId") Integer id) {
        return productService.getProductInfo(id);
    }

}
